"""
URL configuration for TradingPlatform_Server project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
#   Copyright (c)  鱼肠的渔场小组  2025-2025 . All rights reserved.
#   TradingPlatform_Server is licensed under Mulan PSL v2.
#   You can use this software according to the terms and conditions of the Mulan
#   PSL v2.
#   You may obtain a copy of Mulan PSL v2 at:
#            http://license.coscl.org.cn/MulanPSL2
#   THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
#   KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
#   NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#   See the Mulan PSL v2 for more details.

from django.conf import settings
from django.conf.urls.static import static
from django.urls import path

from Server.views import user, audit_store, audit_takeout, discuss, takeout, query_kind_takeout, \
    query_all_takeout, query_name_takeout, takeout_portrait_upload, user_portrait_upload, address, check_user, store, \
    query_default_address, kind, query_store_takeout, query_recommend_takeout, query_store, message, order, single_kind, \
    query_finished_order, payment, recharge, menu, query_new_takeout, update_password
from Server.auth_views import auth_login, send_sms_code, verify_sms_code, login_with_code

urlpatterns = [
    path('user/user', user),
    path('auth/login', auth_login),
    path('auth/send-code', send_sms_code),
    path('auth/verify-code', verify_sms_code),
    path('auth/login-with-code', login_with_code),
    path('user/update-password', update_password),
    path('user/check', check_user),
    path('user/upload-portrait', user_portrait_upload),
    path('takeout/takeout', takeout),
    path('takeout/takeout-upload', takeout_portrait_upload),
    path('takeout/takeout-kind', query_kind_takeout),
    path('takeout/takeout-all', query_all_takeout),
    path('takeout/takeout-store', query_store_takeout),
    path('takeout/takeout-recommend', query_recommend_takeout),
    path('takeout/takeout-name', query_name_takeout),
     path('takeout/takeout-new', query_new_takeout),
    path('audit/audit-store', audit_store),
    path('audit/audit-takeout', audit_takeout),
    path('address/default', query_default_address),
    path('discuss/discuss', discuss),
    path('store/store', store),
    path('store/query-store', query_store),
    path('address/address', address),
    path('kind/kind', kind),
    path('kind/single', single_kind),
    path('message', message),
    path('order/order', order),
    path('order/finished', query_finished_order),
    path('payment/payment', payment),
    path('payment/recharge', recharge),
    path('menu/menu', menu)
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
